package com.cloudcross.ssp.service;



import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.base.web.result.AjaxResult;
import com.cloudcross.ssp.common.utils.Pager;
import com.cloudcross.ssp.model.Advertiser;

public interface IAdvertiserService extends IGenericService<Advertiser>{
	
	//用状态和搜索条件查找广告主
    int countByStatus(Map<String, Object> paramMap);
	
	List<Advertiser> findByStatus(Map<String, Object> paramMap);

	long findByName(String name);
	
	List<Advertiser> findByAgentId(Long id);
	//向t_adgroup里面插入Supdated
    boolean updateSupdated(List<Long> advertiserIdList, int status);
	
	//导出Excel用
    List<Advertiser> findDeliverEffectAnalysis(Map<String, Object> paramMap);
	
	//文件上传
    AjaxResult fileUpload(HttpServletRequest request, HttpServletResponse response);
	
	String selectAdvertiserNameById(Long id);
	
	//更新所有的supdated
    boolean updateSupdatedAll(List<Long> advertiserIdList, Date date);
	//删除所有（逻辑删除）
    boolean updateStatusAll(List<Long> advertiserIdList, int status);
	
	List<Advertiser> findByOperatorOperator(Long operatorId);
	List<Advertiser> findByParamsBack(Map<String, Object> paramMap, Pager pager);
	List<Advertiser> findByParamsOperator(Map<String, Object> paramMap, Pager pager);
	int countByParamsOperator(Map<String, Object> paramMap);
	boolean addBack(Advertiser t);
	boolean editOperator(Advertiser t);
	boolean editBack(Advertiser t);
	//根据广告主ID更新admin_id
    boolean updateAdvertiserAdminId(Advertiser advertiser);
}
